From cdee3531764b945fbe008bcee23fe57f1a311643 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 19 Mar 2007 13:43:42 +0000 Subject: [PATCH] Have timeanddate() change timestamp-looking timestampts to YYYYMMDDHH24MISS integer style. Fixes bug 8558 (Special:Imagelist) as well as other pages (i.e. Special:Unusedimages) --- RELEASE-NOTES | 1 + languages/Language.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 2dc72e50bd..586a549957 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -276,6 +276,7 @@ lighter making things easier to read. image * (bug 8582) Allow thumbnailing when imagesize has a space. * (bug 8716) Change math_inputhash and math_outputhash to byte for Postgres +* (bug 8558) Correct display of timestamps on some pages when using Postgres Support protocols other than HTTP in LinkFilter diff --git a/languages/Language.php b/languages/Language.php index a23c3045ab..db2476728d 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -753,6 +753,12 @@ class Language { */ function timeanddate( $ts, $adj = false, $format = true, $timecorrection = false) { $this->load(); + + ## Account for non-integer timestamps + if (substr($ts,4,1) === '-') { + $ts = preg_replace('/\D/', '', $ts); + } + if ( $adj ) { $ts = $this->userAdjust( $ts, $timecorrection ); } -- 2.20.1